package com.iplant.wms.service.po.brm;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.iplant.base.po.BasePO;
import com.iplant.base.po.enums.DBSchemas;
import com.iplant.base.utils.annotation.po.DBBasePO;
import com.iplant.base.utils.annotation.condition.DBCondition;
import com.iplant.base.utils.annotation.field.DBField;
import com.iplant.base.utils.annotation.join.DBJoin;

import java.io.Serializable;

;

/**
 * 补货规则   同一个仓库一般只有一个 但是规则行内部需要包含所有库区
 *
 * @author ShrisJava
 */
@DBBasePO(TableName = "brm_replenishrule",  CheckName = {"Code"},
        Schemas = DBSchemas.WMS, CodeAuto = true,CodePrefix = "BRR-")
public class BRMReplenishRule extends BasePO implements Serializable {
    private static final long serialVersionUID = 1L;


    @DBCondition
    @DBField
    public int StoreID = 0;

    @DBCondition(CompareType = DBCondition.DBCompareType.like)
    @DBJoin(name = "Code",tableName="wms_store",Schemas = DBSchemas.WMS,tableAsName = "s1",MainTableField = "StoreID")
    public String StoreCode = "";

    @DBCondition(CompareType = DBCondition.DBCompareType.like)
    @DBJoin(name = "Name",tableName="wms_store",Schemas = DBSchemas.WMS,tableAsName = "s1",MainTableField = "StoreID")
    public String StoreName = "";

    /**
     * 规则
     */
    @DBCondition
    @DBField
    public int ShelvesRuleID = 0;

    @DBCondition(CompareType = DBCondition.DBCompareType.like)
    @DBJoin(name = "Code",tableName="brm_shelvesrule",Schemas = DBSchemas.WMS,tableAsName = "r1",MainTableField = "ShelvesRuleID")

    public String ShelvesRuleCode = "";
    @DBCondition(CompareType = DBCondition.DBCompareType.like)
    @DBJoin(name = "Code",tableName="brm_shelvesrule",Schemas = DBSchemas.WMS,tableAsName = "r1",MainTableField = "ShelvesRuleID")

    public String ShelvesRuleName = "";


    @JsonProperty("StoreID")
    public int getStoreID() {
        return StoreID;
    }

    public void setStoreID(int storeID) {
        StoreID = storeID;
    }

    @JsonProperty("StoreCode")
    public String getStoreCode() {
        return StoreCode;
    }

    public void setStoreCode(String storeCode) {
        StoreCode = storeCode;
    }

    @JsonProperty("StoreName")
    public String getStoreName() {
        return StoreName;
    }

    public void setStoreName(String storeName) {
        StoreName = storeName;
    }

    @JsonProperty("ShelvesRuleID")
    public int getShelvesRuleID() {
        return ShelvesRuleID;
    }

    public void setShelvesRuleID(int shelvesRuleID) {
        ShelvesRuleID = shelvesRuleID;
    }

    @JsonProperty("ShelvesRuleCode")
    public String getShelvesRuleCode() {
        return ShelvesRuleCode;
    }

    public void setShelvesRuleCode(String shelvesRuleCode) {
        ShelvesRuleCode = shelvesRuleCode;
    }

    @JsonProperty("ShelvesRuleName")
    public String getShelvesRuleName() {
        return ShelvesRuleName;
    }

    public void setShelvesRuleName(String shelvesRuleName) {
        ShelvesRuleName = shelvesRuleName;
    }


}
